import React, { Component } from 'react';
import {
    Platform,
    StyleSheet,
    Text,
    TouchableOpacity,
    View
} from 'react-native';
import {pTd} from "../../util/adapter";

export default class Buttons extends Component{

    constructor(props) {
        super(props);

    }

    render() {
        const {text,ButtonStyles,ButtonTextStyles,handlePressFunction}=this.props;
        return   <TouchableOpacity activeOpacity={1} style={[style.button,ButtonStyles ? ButtonStyles :null]} onPress={handlePressFunction}>
            <Text style={[style.buttonText,ButtonTextStyles ? ButtonTextStyles : null]}>{text}</Text>
        </TouchableOpacity>
    }
}

const style = StyleSheet.create({
    button:{
        width:'100%',
        height:pTd(96),
        borderRadius:pTd(8),
        backgroundColor:'#ffffff',
        justifyContent: 'center',
        borderStyle:'solid',
        borderWidth: pTd(1),
        borderColor:'#999999'
    },
    buttonText:{
        fontSize:pTd(32),
        textAlign:'center',
        color:"#333333",
    }
});
